/*
 * @Author: zhangzhengzhe
 * @Date: 2019-09-19 13:59:11
 * @LastEditors: zhangzhengzhe
 * @LastEditTime: 2019-09-26 14:06:21
 */
import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import App from './App.vue'
import { createRouter } from './router/router'
import { createStore } from './store/store'

Vue.use(require('vue-lodash'))
Vue.use(require('vue-moment'))

Vue.config.productionTip = false

/* 导出一个工厂函数，用于创建新的 */
/* 应用程序、router 和 store 实例 */
export const createApp = () => {
  const store = createStore()
  const router = createRouter()
  const app = new Vue({
    router,
    store,
    // 根实例简单的渲染应用程序组件。
    render: h => h(App)
  })
  return { app, router }
}
